#ifndef __POSTPROCESS_H__
#define __POSTPROCESS_H__

class Effect
{
	GLuint framebuffer;
	GLuint depthbuffer;
	GLuint texture;
	unsigned int width,height;
	Shader *shader;
	Texture *tex;
	unsigned int blend;
	float r,g,b,a;

	void Init();

	bool ok;

	bool bindaded[16];

public:
	Effect();
	Effect(unsigned int width, unsigned int height);
	~Effect();

	void Bind();
	void UnBind();

	void BindShader(Shader *sh);
	void BindTexture(Texture *tex_,int layer);
	void BindDepthTexture(Texture *tex_);

	void Blend(unsigned char mode);
	void Color(float r,float g,float b,float a);
	void Draw();

	unsigned int GetWidth();
	unsigned int GetHeight();
};

#endif